<?php foreach ($posts as $post): ?>
            	<div class="row" style=" background-color: #D8D8D8;border: 1.5px solid; border-color:#2E2E2E; -webkit-border-top-left-radius: 50px;-webkit-border-bottom-right-radius: 50px;-moz-border-radius-topleft: 50px;-moz-border-radius-bottomright: 50px;border-top-left-radius: 50px;border-bottom-right-radius: 50px; width: 820px">
            		<div class="col-xs-6 col-md-3" style="height: 480px; width: 150px; background-color: #2E2E2E;-webkit-border-top-left-radius: 45px;-moz-border-radius-topleft: 45px;border-top-left-radius: 45px;">

                </div> 
				<div class="col-xs-12 col-md-8" style="height: 480px; width: 665px; wid-webkit-border-bottom-right-radius: 50px;-moz-border-radius-bottomright: 50px;border-bottom-right-radius: 50px;">
			<h1>
				<a href="/posts/view/<?php echo $post['Post']['id'];?>"><?php if(strlen($post['Post']['title']) > 36) echo substr($post['Post']['title'], 0,36)."...."; else echo $post['Post']['title']; ?></a>
			</h1>
			<div class="postCreated" align="left" style="background-color: #E0ECF8">
				<small> by: <?php echo $post ['Post'] ['Username']; ?></small> 
				<small> - at: <?php echo $post['Post']['created'];?></small>
			</div>
			<hr />
			<div style="text-align: center;">
				<img
					src="<?php if($post['Post']['thumbnail']) echo $post['Post']['thumbnail']; else echo "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRkD8GfRhPJIMIEl6MHDVSzTwrsTybrTm6LphA9WP6ylF8eFN3a_Q";?>"
					class="img-thumbnail" style="max-height: 200px; max-width: 200px;">
			</div>
			<p class="lead"><?php echo $post['Post']['body'];?>....</p>
			<div>
			<a href="/posts/view/<?php echo $post['Post']['id'];?>">Continues
							reading ...</a>
						<hr />
					</div>   
                </div>
                
                </div>
                <div class="row" style="height: 5px"></div>	
<?php endforeach;?>